package com.google.code.doxiafiletreetool;

import java.io.File;
import java.io.FileFilter;
import java.util.regex.Pattern;


public interface Constants {
	
	String indexHtml = "index.xhtml";
	
	String utf8 = "UTF-8";
	
	String dot = ".";
	
	String apt = "apt";
	
	String markdown = "mkd";
	
	String aptExtension = dot + apt;
	
	String markdownExtension = dot + markdown;
	
	String xhtml = "xhtml";
	
	String xhtmlExtension = dot + xhtml;
	
	String mm = "mm";
	
	String mmExtension = dot + mm;
	
	String svnFolder = ".svn";
	
	String favIcon = "<link rel=\"icon\" href=\"%FAVPATH%favicon.ico\" type=\"image/x-icon\"/>\n";

	String css = "<style type=\"text/css\">"
			+ "body { background-color:#eeeedd; }"
			+ "h1, h2, h3, h4 { font-family:sans-serif; }"
			+ "h1 { font-size:xx-large; }"
			+ "h2 { font-size:x-large; color:navy; }"
			+ "h3 { font-size:large; color:blue; }"
			+ "h4 { font-size:medium; color:teal; }"
			+ "dt { font-weight:bold; font-family:monospace; color:green; }"
			+ "a { color:#dd0000; }"
			+ "</style>\n";
	
	String header = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>Index</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>" + css + favIcon + "</head>\n<body>\n";
	
	String footer = "</body></html>";
	
	String target = "_xhtml";
	
	String backup = ".backup";
	
	String htmlPattern = ".+\\.x?html?$"; // detect html files
	
	Pattern dotPattern = Pattern.compile("\\..+"); // detect dot files and dirs
	
	String linkedDir = "_files";
	
    FileFilter htmlFilter = new FileFilter() {
    	final Pattern p = Pattern.compile(htmlPattern);
    	@Override
    	public boolean accept(final File entry) {
    		return entry.isFile() && p.matcher(entry.getName()).matches();
    	}
    };
    
    String appletCode = "<center><object type=\"application/x-java-applet;version=1.6\" classid=\"java:org.freeplane.main.applet.FreeplaneApplet.class\" archive=\"XXfreeplaneviewer.jar\" width=\"760\" height=\"450\">\n  <param name=\"scriptable\" value=\"false\"/>\n  <param name=\"modes\" value=\"freemind.modes.browsemode.BrowseMode\"/>\n  <param name=\"browsemode_initial_map\" value=\"./YY\"/>\n  <param name=\"selection_method\" value=\"selection_method_direct\"/>\n  <param name=\"initial_mode\" value=\"Browse\"/>\n</object></center>\n";
    
	byte[] titleDocuments = "<hr/><h3>Documents</h3>\n".getBytes();
    		
    byte[] titleHtml = "<hr/><h3>Existing HTML files</h3>\n".getBytes();
    
    byte[] titleMindmaps = "<hr/><h3>Mindmaps</h3>\n".getBytes();
    
}
